|
|
|
| TABLE 4.1.CONTINUED | | Class | Properties | Methods | | Teller_Interface | None | closeAccount(argAcctNum As String) | | | depositFunds(argAmount As Currency) | | | openAccount(argSSN As String) | | | queryCheckingHistory(argSSN As String) | | | queryCreditHistory(argSSN As String) | | | Private: verifyExistingAccount(Optional
argSSN, Optional argAcctNum) | | | withdrawFunds(argAmount As Currency) |
|
|
|
|
|
|
Notice that BankAccounts is a collection class. You will implement this as a collection class in Visual Basic. You can manually put in the standard methods and properties that collections typically have, or you can automate the process of creating collection classes. To automate this process, first choose Tools | Class Builder Utility from the menu. If you've used Visual Basic before reading this chapter, you'll recognize the familiar Class Builder dialog. Choose File | New | Collection from the menu in the Class Builder dialog. You should see the Collection Builder dialog. By default, the name suggested for the new collection is Collection1. Change this to BankAccounts. Leave the Based On: drop-down list box alone because you are creating a new collection. In the Collection Of frame, choose New Class to trick the utility into letting you proceed (you won't need the class it creates). Click OK. Click File | Update project from the menu (Visual Basic needs to be running). Exit the Class Builder utility. |
|
|
|
|
|
|
|
|
Note If you encounter conflict problems with the existing BankAccounts class, delete it from the model, and re-create it as a collection class. Otherwise, add the typical collection properties and methods to the existing BankAccounts class in the model. |
|
|
|
|
|
|
|
|
|
You will see the Reverse Engineering Wizard welcome dialog. Because you are creating the BankAccounts collection class first, using the Class Builder utility within Visual Modeler, you must reverse engineer it back into the current model. Thus, click the Next button. There's no need to select a component, so click the Next button again. The next step is to assign the new collection class to a Logical View Package. The standard packages are User, Business, and Data Services. User Services includes the class associated with graphical user interface processes. Business Services has those classes associated |
|
|
|
|
|